<style>
	table th, table td{
		text-align: center !important;
	}
	.page-content .portlet .portlet-search-body .search-item{
		width: 15%;
	}
</style>

<div class="portlet">
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="stockName" placeholder="材料名称">
        <input type="text" class="form-control search-item" ng-model="typeName" placeholder="类型">

		<div class="input-group input-large date-picker input-daterange" ed-date-picker style="float: left;margin-right: 10px;">
			<input type="text" class="form-control" ng-model="inventoryTimeStart" placeholder="盘存时间(开始)">
			<span class="input-group-addon">- </span>
			<input type="text" class="form-control" ng-model="inventoryTimeEnd" placeholder="盘存时间(截止)">
		</div>

        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'stockInventory/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
                <th data-options="field: 'stockName'">材料名称</th>
                <th data-options="field: 'typeName'">类型</th>
                <th data-options="field: 'spec'">规格</th>
                <th data-options="field: 'unit'">单位</th>
                <th data-options="field: 'inventoryTime | limitTo : 10'">盘存时间</th>
                <th data-options="field: 'yearNum'">年初库存</th>
                <th data-options="field: 'monthIn'">本月购进</th>
                <th data-options="field: 'monthOut'">本月领用</th>
                <th data-options="field: 'monthNum'">月末库存</th>
                <th data-options="field: 'monthNumManual'">手工统计</th>
                <th data-options="field: 'remark'">备注</th>
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: 'xxxx', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
        	<div class="form-group">
				<label class="col-md-2 control-label">材料名称</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="stockName" ng-model="stockInventory.stockName" required>
            	</div>
				<label class="col-md-2 control-label">类型</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="typeName" ng-model="stockInventory.typeName" required>
				</div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">规格</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="spec" ng-model="stockInventory.spec" required>
            	</div>
				<label class="col-md-2 control-label">单位</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="unit" ng-model="stockInventory.unit" required>
				</div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">盘存时间</label>
				<div class="col-md-4">
					<input type="text" class="form-control" ed-date-picker name="inventoryTime" ng-model="stockInventory.inventoryTime" required>
            	</div>
				<label class="col-md-2 control-label">年初库存</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="yearNum" ng-model="stockInventory.yearNum" required>
				</div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">本月购进</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="monthIn" ng-model="stockInventory.monthIn" required>
            	</div>
				<label class="col-md-2 control-label">本月领用</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="monthOut" ng-model="stockInventory.monthOut" required>
				</div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">月末库存</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="monthNum" ng-model="stockInventory.monthNum" required>
            	</div>
				<label class="col-md-2 control-label">手工统计</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="monthNumManual" ng-model="stockInventory.monthNumManual" required>
				</div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">备注</label>
				<div class="col-md-10">
					<input type="text" class="form-control" name="remark" ng-model="stockInventory.remark" required>
            	</div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" w5c-form-submit="grid.save();">
                <i class="fa fa-check"></i> 确定
            </button>
        </div>
    </form>
</div>
